package com.guoju.tyframework.mvc.config;

public class BeanProperty implements Comparable<BeanProperty>{
	
	private String name;
	private String ref;
	private String type;
	
	public BeanProperty() {
	}
	
	public BeanProperty(String name, String ref, String type) {
		this.name = name;
		this.ref = ref;
		this.type = type;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getRef() {
		return ref;
	}
	public void setRef(String ref) {
		this.ref = ref;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@Override
	public int compareTo(BeanProperty o) {
		return 0;
	}
	@Override
	public int hashCode() {
		return (name==null?name.hashCode():0)+32;
	}

	@Override
	public boolean equals(Object obj) {
		if(this==obj){
			return true;
		}
		if(!(obj instanceof BeanProperty)){
			return false;
		}
		final BeanProperty property = (BeanProperty) obj;
		if((name!=null)?(!name.equals(property.getName())):(property.getName()!=null)){
			return false;
		}
		return true;
	}

	@Override
	public String toString() {
		return "name="+name+"||ref="+ref+"||type="+type;
	}
}
